FROM python:3.9-slim

WORKDIR /app

# 安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制应用程序代码
COPY . .

# 暴露端口
EXPOSE 8000

# 初始化应用程序并启动
CMD ["python", "run.py", "--setup", "--host", "0.0.0.0", "--port", "8000"]